PropertyOutputStream (Apache Ant API)

org.apache.tools.ant.util

## Class PropertyOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - java.io.ByteArrayOutputStream
    - - org.apache.tools.ant.util.PropertyOutputStream

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

      public class PropertyOutputStream
      extends java.io.ByteArrayOutputStream

  Exception thrown when an attempt is made to get an OutputStream from an immutable Resource.
  Since:
    Ant 1.7

- - ### Field Summary

    - ### Fields inherited from class java.io.ByteArrayOutputStream

      `buf, count`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyOutputStream(Project p, java.lang.String s)` Construct a new PropertyOutputStream for the specified Project and property name, trimming the property value.
    `PropertyOutputStream(Project p, java.lang.String s, boolean b)` Construct a new PropertyOutputStream for the specified Project, property name, and trim mode.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the PropertyOutputStream, storing the property.

    - ### Methods inherited from class java.io.ByteArrayOutputStream

      `reset, size, toByteArray, toString, toString, toString, write, write, writeTo`

    - ### Methods inherited from class java.io.OutputStream

      `flush, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PropertyOutputStream

          public PropertyOutputStream(Project p,
                              java.lang.String s)

      Construct a new PropertyOutputStream for the specified Project and property name, trimming the property value.
      Parameters:
        `p` - the associated Ant Project.
        `s` - the String property name.

    - #### PropertyOutputStream

          public PropertyOutputStream(Project p,
                              java.lang.String s,
                              boolean b)

      Construct a new PropertyOutputStream for the specified Project, property name, and trim mode.
      Parameters:
        `p` - the associated Ant Project.
        `s` - the String property name.
        `b` - the boolean trim mode.

  - ### Method Detail

    - #### close

          public void close()

      Close the PropertyOutputStream, storing the property.
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.ByteArrayOutputStream`